export type timState = {
  isLogin: boolean,
  conversation: object,
  conversationList: array,
  conversationID: string,
  imagepath: object,
  commonpath: object,
  videopath: object,
  soundpath: object,
  filepath: object,
  messageList: array,
  scrollTop: number,
  userInfo: object,
  baidufanyiId: string,
  baiduyuyinId: string,
  developtext:string,
  voicebody:array,
};

const state: timState = {
  commonpath:{},
  videopath: {},
  soundpath: {},
  imagepath:{},
  filepath:{},
  isLogin: false,
  conversationList: [],
  messageList: [],
  conversation: {},
  conversationID: '',
  scrollTop: 0,
  baidufanyiId:'',
  baiduyuyinId:'',
  developtext:'',
  voicebody:[],
};

export default {
  namespaced: true,
  state,
  getters: {
    userInfo: (state): string => {
      return state.userInfo;
    }
  },
  mutations: {
  setscrollTop(state: timState, payload: number): void {
    state.scrollTop = payload;
  },
	setImagepath(state: timState, payload: object): void {
	  state.imagepath = payload;
	},
	setFilepath(state: timState, payload: object): void {
	  state.filepath = payload;
	},
	setSoundpath(state: timState, payload: object): void {
	  state.soundpath = payload;
	},
	setDeveloptext(state: timState, payload: string): void {
	  state.developtext = payload;
	},
	setCommonpath(state: timState, payload: object): void {
	  state.commonpath = payload;
	},
	setVideopath(state: timState, payload: object): void {
	  state.videopath = payload;
	},
    setConversationList(state: timState, payload: object): void {
      state.conversationList = payload;
    },
	setVoicebody(state: timState, payload: object): void {
	  state.voicebody = payload;
	},
    setConversation(state: timState, payload: object): void {
      state.conversation = payload;
    },
    setConversationID(state: timState, payload: string): void {
      state.conversationID = payload;
    },
	resetConversationID(state: timState,): void {
	  state.conversationID = '';
	},
    setMessageList(state: timState, payload: object): void {
      state.messageList = payload;
    },
    resetChat(state: timState): void {
      state.messageList = [];
    },
    setBaiDuFanYiId(state: timState, payload: string): void {
      state.baidufanyiId = payload;
    },
	setBaiDuYuYinId(state: timState, payload: string): void {
	  state.baiduyuyinId = payload;
	},
  },
  actions: {
    // 

  },
};